
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 '     I N F I N I T E   F O R   N E X T 
 
 
 
 '     T h i s   d e m o   s h o w s : 
 
 
 
 '     -   H o w   t o   c r e a t e   i n f i n i t e   l o o p s 
 
 
 
 '     -   H o w   t o   e x i t   f r o m   t h e   F O R   l o o p 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 '   P r e s s   S P A C E   t o   e x i t   f r o m   t h e   F O R   L O O P 
 
 
 
 F o r   v 1   =   1   T o   I n f i n i t y 
 
 	 
 
 	 I f   K e y ( " S P A C E " ) 
 
 	 	 v 1   =   I n f i n i t y 
 
 	 E n d I f 
 
 	 
 
 	 P r i n t   v 1 
 
 	 W a i t   S e c o n d s   0 . 0 1 
 
 N e x t 
 
 
 
 S t o p 
 
 
 
 
 
 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 '     Y o u   c o u l d   a l s o   e x i t   w i t h   t h e   E x i t   k e y w o r d 
 
 '     a s   s h o w n   i n   t h e   n e x t   e x a m p l e 
 
 '   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
 
 
 F o r   v 1   =   1   T o   I n f i n i t y 
 
 	 
 
 	 I f   K e y ( " S P A C E " ) 
 
 	 	 E x i t 
 
 	 E n d I f 
 
 	 
 
 	 P r i n t   v 1 
 
 	 W a i t   S e c o n d s   0 . 0 1 
 
 N e x t 
 
 
 
 
 
 
 
 
 
 ' W A T C H   v 1 
 
 